import { defineStore } from "pinia";
export const userStore = defineStore({
  id: "user",
  state: (): {
    userInfo: {
      username: "",
      address: string;
      score: Number
    },
  } => {
    return {
      userInfo: {
        username: "",
        address: "",
        score: 0
      },
    }
  },
  actions: {
    setUserInfo(user: any) {
      this.userInfo = user
      console.log("dshjs", this.userInfo)
    },
    removeUserinfo() {
      this.userInfo = {
        username: "",
        address: "",
        score: 0
      }
    }
  }
})

